<template>
  <div class="app-container">
    <el-form
      :model="queryParams"
      ref="queryForm"
      :inline="true"
      v-show="showSearch"
      label-width="68px"
    >
      <!--<el-form-item label="设备名称" prop="eqpName">
        <el-input
          v-model="queryParams.eqpName"
          placeholder="请输入设备名称"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>

      <el-form-item label="设备编码" prop="eqpCode">
        <el-input
          v-model="queryParams.eqpCode"
          placeholder="请输入设备编码"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>-->
      <!-- <el-form-item label="停机时间" prop="stopDate">
         <el-date-picker :editable="false" clearable size="small"
           v-model="queryParams.stopDate"
           type="date"
           value-format="yyyy-MM-dd"
           placeholder="选择停机时间">
         </el-date-picker>
       </el-form-item> -->
      <el-form-item label="生产线" prop="productLineId">
        <!--<el-input
            v-model="queryParams.productLineId"
            placeholder="请选择生产线"
            clearable
            size="small"
            @keyup.enter.native="handleQuery"
          />-->
        <el-select
          v-model="queryParams.productLineId"
          placeholder="请选择停机类型"
          clearable
          size="small"
        >
          <el-option
            v-for="dict in productLineOptions"
            :key="dict.id"
            :label="dict.name"
            :value="dict.id"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="班组" prop="groupId">
        <!--<el-input
            v-model="queryParams.groupId"
            placeholder="请输入班组id"
            clearable
            size="small"
            @keyup.enter.native="handleQuery"
          />-->
        <el-select
          v-model="queryParams.groupId"
          placeholder="请选择班组"
          clearable
          size="small"
        >
          <el-option
            v-for="dict in groupListOptions"
            :key="dict.id"
            :label="dict.name"
            :value="dict.id"
          />
        </el-select>
      </el-form-item>
      <!-- <el-form-item label="设备id" prop="eqpId">
          <el-input
            v-model="queryParams.eqpId"
            placeholder="请输入设备id"
            clearable
            size="small"
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>-->
      <!--<el-form-item label="类型【1：设备停机， 2 ：整线停机】" prop="type">
        <el-select v-model="queryParams.type" placeholder="请选择类型【1：设备停机， 2 ：整线停机】" clearable size="small">
          <el-option label="请选择字典生成" value="" />
        </el-select>
      </el-form-item>-->

      <!--<el-form-item label="所属工厂id" prop="deptId">
        <el-input
          v-model="queryParams.deptId"
          placeholder="请输入所属工厂id"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>-->
      <!--<el-form-item label="停机时长" prop="stopDuration">
        <el-input
          v-model="queryParams.stopDuration"
          placeholder="请输入停机时长"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>-->
      <el-form-item label="停机类型" prop="stopType">
        <el-select
          v-model="queryParams.stopType"
          placeholder="请选择停机类型"
          clearable
          size="small"
        >
          <el-option
            v-for="dict in stopTypeOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="停机来源" prop="stopResource">
        <el-select
          v-model="queryParams.stopResource"
          placeholder="请选择停机来源"
          clearable
          size="small"
        >
          <el-option
            v-for="dict in stopResourceOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="停机原因" prop="stopReason">
        <el-select
          v-model="queryParams.stopReason"
          placeholder="请选择停机原因"
          clearable
          size="small"
        >
          <el-option
            v-for="dict in stopReasonOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>

      <!--<el-form-item label="开始时间" prop="stopDateStart">
        <el-date-picker :editable="false" clearable size="small"
                        v-model="queryParams.stopDateStart"
                        type="date"
                        value-format="yyyy-MM-dd"
                        placeholder="选择开始时间">
        </el-date-picker>
      </el-form-item>

      <el-form-item label="结束时间" prop="stopDateEnd">
        <el-date-picker :editable="false" clearable size="small"
                        v-model="queryParams.stopDateEnd"
                        type="date"
                        value-format="yyyy-MM-dd"
                        placeholder="选择结束时间">
        </el-date-picker>
      </el-form-item>-->
      <el-form-item label="时间范围" prop="stopDateArray">
        <el-date-picker
          :editable="false"
          v-model="stopDateArray"
          type="datetimerange"
          range-separator="至"
          value-format="yyyy-MM-dd HH:mm:ss"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
        >
        </el-date-picker>
      </el-form-item>
      <el-form-item>
        <el-button
          type="primary"
          icon="el-icon-search"
          size="mini"
          @click="handleQuery"
          >搜索</el-button
        >
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
          >重置</el-button
        >
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['produce:stop:add']"
          >新增</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['produce:stop:edit']"
          >修改</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['produce:stop:remove']"
          >删除</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['produce:stop:export']"
          >导出</el-button
        >
      </el-col>
      <right-toolbar
        :showSearch.sync="showSearch"
        @queryTable="getList"
      ></right-toolbar>
    </el-row>

    <el-table
      v-loading="loading"
      :data="stopList"
      @selection-change="handleSelectionChange"
      max-height="550"
    >
      <el-table-column type="selection" width="55" align="center" />
      <!--<el-table-column label="主键id" align="center" prop="id" />-->
      <el-table-column
        label="停机日期"
        align="center"
        prop="stopDate"
        width="100"
      >
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.stopDate, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>
      <!--<el-table-column label="设备名称" align="center" prop="eqpName" />
      <el-table-column label="设备编码" align="center" prop="eqpCode" />-->

      <el-table-column label="生产线" align="center" prop="productLineName" minWidth="250px"/>

      <el-table-column label="班组" align="center" prop="groupName" />
      <el-table-column label="所属工厂" align="center" prop="deptName"  minWidth="110px"/>
      <!--<el-table-column label="设备id" align="center" prop="eqpId" />  -->
      <!--<el-table-column label="类型【1：设备停机， 2 ：整线停机】" align="center" prop="type" />-->
      <el-table-column
        label="开始时间"
        align="center"
        prop="stopDateStart"
        minWidth="170px"
      >
        <template slot-scope="scope">
          <span>{{
            parseTime(scope.row.stopDateStart, "{y}-{m}-{d} {h}:{i}:{s}")
          }}</span>
        </template>
      </el-table-column>

      <el-table-column
        label="结束时间"
        align="center"
        prop="stopDateEnd"
        minWidth="170px"
      >
        <template slot-scope="scope">
          <span>{{
            parseTime(scope.row.stopDateEnd, "{y}-{m}-{d} {h}:{i}:{s}")
          }}</span>
        </template>
      </el-table-column>

      <el-table-column label="停机时长" align="center" prop="stopDuration" minWidth="110px"/>
      <el-table-column
        label="停机类型"
        align="center"
        prop="stopType"
        :formatter="stopTypeFormat"
      />
      <el-table-column
        label="停机来源"
        align="center"
        prop="stopResource"
        :formatter="stopResourceFormat"
      />
      <el-table-column
        label="停机原因"
        align="center"
        prop="stopReason"
        :formatter="stopReasonFormat"
      />
      <!--<el-table-column label="备注" align="center" prop="remark" />-->
      <el-table-column
        label="操作"
        align="center"
        min-width="180"
        class-name="small-padding fixed-width"
      >
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-view"
            @click="handleView(scope.row)"
            >查看</el-button
          >
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['produce:stop:edit']"
            >修改</el-button
          >
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['produce:stop:remove']"
            >删除</el-button
          >
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改生产停机管理对话框 -->
    <el-dialog v-myFullscreen
      :title="title"
      :visible.sync="open"
      width="700px"
      append-to-body
      v-myDialogDrag
    >
      <el-form ref="form" :model="form" :rules="rules" label-width="90px">
        <el-row>
          <el-col :span="24">
            <el-form-item label="停机日期" prop="stopDate">
              <el-date-picker
                :editable="false"
                clearable
                size="small"
                v-model="form.stopDate"
                type="date"
                value-format="yyyy-MM-dd"
                placeholder="选择停机日期"
                :disabled="openDisabled"
              >
              </el-date-picker>
            </el-form-item>
          </el-col>
          <!--<el-col :span="24">
              <el-form-item label="设备名称" prop="eqpId">
                &lt;!&ndash;<el-input v-model="form.eqpId" placeholder="请输入设备名称" :disabled="openDisabled" />&ndash;&gt;
                <el-select v-model="form.eqpId" placeholder="请选择设备名称" clearable size="small" @change="formatEqpCode" :disabled="openDisabled">
                  <el-option
                    v-for="dict in eqpListOptions"
                    :key="dict.id"
                    :label="dict.name"
                    :value="dict.id"
                  />
                </el-select>
              </el-form-item>
            </el-col>

            <el-col :span="24">
              <el-form-item label="设备编码" prop="eqpCode">
                <el-input v-model="form.eqpCode" placeholder="请输入设备编码" :disabled="true" />
              </el-form-item>
            </el-col>-->

          <el-col :span="24">
            <el-form-item label="生产线" prop="productLineId">
              <!--<el-input v-model="form.productLineId" placeholder="请输入生产线id" :disabled="openDisabled" />-->
              <el-select
                v-model="form.productLineId"
                placeholder="请选择生产线"
                clearable
                size="small"
                :disabled="openDisabled"
              >
                <el-option
                  v-for="dict in productLineOptions"
                  :key="dict.id"
                  :label="dict.name"
                  :value="dict.id"
                />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="班组" prop="groupId">
              <!--<el-input v-model="form.groupId" placeholder="请输入班组id" :disabled="openDisabled" />-->
              <el-select
                v-model="form.groupId"
                placeholder="请选择班组"
                clearable
                size="small"
                @change="formatDeptName"
                :disabled="openDisabled"
              >
                <el-option
                  v-for="dict in groupListOptions"
                  :key="dict.id"
                  :label="dict.name"
                  :value="dict.id"
                />
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="24">
            <el-form-item label="所属工厂" prop="deptId">
              <el-input
                v-model="form.deptName"
                placeholder="请输入所属工厂"
                :disabled="true"
              />
            </el-form-item>
          </el-col>

          <el-col :span="24">
            <el-form-item label="停机类型" prop="stopType">
              <el-select
                v-model="form.stopType"
                placeholder="请选择停机类型"
                :disabled="openDisabled"
              >
                <el-option
                  v-for="dict in stopTypeOptions"
                  :key="dict.dictValue"
                  :label="dict.dictLabel"
                  :value="parseInt(dict.dictValue)"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="停机来源" prop="stopResource">
              <el-select
                v-model="form.stopResource"
                placeholder="请选择停机来源"
                :disabled="openDisabled"
              >
                <el-option
                  v-for="dict in stopResourceOptions"
                  :key="dict.dictValue"
                  :label="dict.dictLabel"
                  :value="parseInt(dict.dictValue)"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="停机原因" prop="stopReason">
              <el-select
                v-model="form.stopReason"
                placeholder="请选择停机原因"
                :disabled="openDisabled"
              >
                <el-option
                  v-for="dict in stopReasonOptions"
                  :key="dict.dictValue"
                  :label="dict.dictLabel"
                  :value="parseInt(dict.dictValue)"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="开始时间" prop="stopDateStart">
              <el-date-picker
                :editable="false"
                clearable
                size="small"
                @change="stopDurationFormat($event)"
                v-model="form.stopDateStart"
                type="datetime"
                value-format="yyyy-MM-dd HH:mm:ss"
                placeholder="选择开始时间"
                :disabled="openDisabled"
              >
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="结束时间" prop="stopDateEnd">
              <el-date-picker
                :editable="false"
                clearable
                size="small"
                @change="stopDurationFormat($event)"
                v-model="form.stopDateEnd"
                type="datetime"
                value-format="yyyy-MM-dd HH:mm:ss"
                placeholder="选择结束时间"
                :disabled="openDisabled"
              >
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="停机时长" prop="stopDuration">
              <el-input
                v-model="form.stopDuration"
                placeholder="请输入停机时长"
                :disabled="true"
              />
            </el-form-item>
          </el-col>

          <el-col :span="24">
            <el-form-item label="停机描述" prop="remark">
              <el-input
                v-model="form.remark"
                type="textarea"
                placeholder="请输入停机描述"
                :disabled="openDisabled"
              />
            </el-form-item>
          </el-col>

          <!--<el-col :span="12">
                <el-form-item label="类型【1：设备停机， 2 ：整线停机】" prop="type">
                  <el-select v-model="form.type" placeholder="请选择类型【1：设备停机， 2 ：整线停机】" :disabled="openDisabled">
                    <el-option label="请选择字典生成" value="" />
                  </el-select>
                </el-form-item>
            </el-col> -->
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer" v-if="!openDisabled">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import {
  listStop,
  getStop,
  delStop,
  addStop,
  updateStop,
  getProductLineList,
  getTeamGroupSelect,
} from "@/api/produce/stop/stop";

export default {
  name: "Stop",
  data() {
    return {
      //弹窗是否禁止编辑
      openDisabled: true,
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      stopDateArray: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 生产停机管理表格数据
      stopList: [],
      groupListOptions: [],
      productLineOptions: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 停机类型字典
      stopTypeOptions: [],
      // 停机来源字典
      stopResourceOptions: [],
      // 停机原因字典
      stopReasonOptions: [],
      eqpListOptions: [],
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 50,
        stopDate: null,
        productLineId: null,
        eqpId: null,
        type: null,
        stopDateStart: null,
        groupId: null,
        stopDateEnd: null,
        deptId: null,
        stopDuration: null,
        stopType: null,
        stopResource: null,
        stopReason: null,
        eqpName: null,
        eqpCode: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        stopDate: [
          { required: true, message: "停机时间不能为空", trigger: "blur" },
        ],
        eqpId: [{ required: true, message: "设备不能为空", trigger: "blur" }],
        stopDateStart: [
          { required: true, message: "开始时间不能为空", trigger: "blur" },
        ],
        stopDateEnd: [
          { required: true, message: "结束时间不能为空", trigger: "blur" },
        ],
        stopType: [
          { required: true, message: "停机类型不能为空", trigger: "change" },
        ],
        stopResource: [
          { required: true, message: "停机来源不能为空", trigger: "change" },
        ],
        stopReason: [
          { required: true, message: "停机原因不能为空", trigger: "change" },
        ],
        productLineId: [
          { required: true, message: "生产线不能为空", trigger: "change" },
        ],
        groupId: [
          { required: true, message: "班组不能为空", trigger: "change" },
        ],
        remark: [
          { required: true, message: "停机描述不能为空", trigger: "change" },
        ],
      },
    };
  },
  created() {
    this.getList();
    this.getDicts("stop_type").then((response) => {
      this.stopTypeOptions = response.data;
    });
    this.getDicts("stop_resouce").then((response) => {
      this.stopResourceOptions = response.data;
    });
    this.getDicts("stop_reason").then((response) => {
      this.stopReasonOptions = response.data;
    });
    this.getProductLineList();
    this.getTeamGroupSelect();
  },
  methods: {
    /** 查询生产停机管理列表 */
    getList() {
      this.queryParams.type = 2;
      this.loading = true;
      listStop(this.queryParams).then((response) => {
        this.stopList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    listEqpSelect() {
      listEqpSelect(null).then((response) => {
        this.eqpListOptions = response.rows;
      });
    },

    getProductLineList() {
      getProductLineList().then((response) => {
        this.productLineOptions = response.data;
      });
    },

    getTeamGroupSelect() {
      return getTeamGroupSelect().then((response) => {
        this.groupListOptions = response.rows;
      });
    },
    // 停机类型字典翻译
    stopTypeFormat(row, column) {
      return this.selectDictLabel(this.stopTypeOptions, row.stopType);
    },
    // 停机来源字典翻译
    stopResourceFormat(row, column) {
      return this.selectDictLabel(this.stopResourceOptions, row.stopResource);
    },
    // 停机原因字典翻译
    stopReasonFormat(row, column) {
      return this.selectDictLabel(this.stopReasonOptions, row.stopReason);
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },

    formatDeptName(row) {
      for (let temp of this.groupListOptions) {
        if (temp.id == row) {
          this.form.deptName = temp.factoryName;
          this.form.deptId = temp.factoryId;
        }
      }
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        stopDate: null,
        productLineId: null,
        eqpId: null,
        type: null,
        stopDateStart: null,
        groupId: null,
        stopDateEnd: null,
        deptId: null,
        deptName: null,
        stopDuration: null,
        stopType: null,
        stopResource: null,
        stopReason: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        delFlag: null,
        remark: null,
        eqpName: null,
        eqpCode: null,
      };
      this.resetForm("form");
    },

    stopDurationFormat(row) {
      if (this.form.stopDateEnd && this.form.stopDateStart) {
        var start = this.form.stopDateStart;
        var end = this.form.stopDateEnd;
        this.form.stopDuration = this.dateDifference(start, end);
      } else {
        // console.log("缺少时间");
      }
    },

    dateDifference(start, end) {
      // let d1 = new Date(faultDate);
      // let d2 = new Date(completeTime);
      var stime = new Date(start).getTime();
      var etime = new Date(end).getTime();
      var usedTime = etime - stime; //两个时间戳相差的毫秒数
      if (usedTime < 0) {
        return "0";
      }
      var days = Math.floor(usedTime / (24 * 3600 * 1000));
      //计算出小时数
      var leave1 = usedTime % (24 * 3600 * 1000); //计算天数后剩余的毫秒数
      var hours = Math.floor(leave1 / (3600 * 1000));
      //计算相差分钟数
      var leave2 = leave1 % (3600 * 1000); //计算小时数后剩余的毫秒数
      var minutes = Math.floor(leave2 / (60 * 1000));
      var time = days + "天" + hours + "时" + minutes + "分";
      //var time = days;
      return time;
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      if (this.stopDateArray && this.stopDateArray.length > 0) {
        // console.log(this.stopDateArray[0]);
        // console.log(this.stopDateArray[1]);
        this.queryParams.stopDateStart = this.stopDateArray[0];
        this.queryParams.stopDateEnd = this.stopDateArray[1];
      }
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.stopDateArray = [];
      this.queryParams.stopDateEnd = null;
      this.queryParams.stopDateStart = null;
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.id);
      this.single = selection.length !== 1;
      this.multiple = !selection.length;
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.openDisabled = false;
      this.open = true;
      this.title = "添加生产停机管理";
      this.form.type = 2;
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      this.openDisabled = false;
      const id = row.id || this.ids;
      getStop(id).then((response) => {
        this.form = response.data;
        this.open = true;
        this.title = "修改生产停机管理";
      });
    },
    /** 查看按钮 */
    handleView(row) {
      this.reset();
      this.openDisabled = true;
      const id = row.id || this.ids;
      getStop(id).then((response) => {
        this.form = response.data;
        this.open = true;
        this.title = "查看生产停机管理";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          if (this.form.id != null) {
            updateStop(this.form).then((response) => {
              this.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            const rLoading = this.openLoading();
            addStop(this.form)
              .then((response) => {
                this.msgSuccess("新增成功");
                this.open = false;
                rLoading.close();
                this.getList();
              })
              .catch((error) => {
                rLoading.close();
              });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$confirm(
        '是否确认删除生产停机管理编号为"' + ids + '"的数据项?',
        "警告",
        {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        }
      )
        .then(function () {
          return delStop(ids);
        })
        .then(() => {
          this.getList();
          this.msgSuccess("删除成功");
        })
        .catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download(
        "produce/stop/export",
        {
          ...this.queryParams,
        },
        "生产停机管理" + this.parseTime(new Date()) + ".xlsx"
      );
    },
  },
};
</script>
